package com.xiaoge.system.service.impl;

import com.xiaoge.response.Result;
import com.xiaoge.system.entity.Notice;
import com.xiaoge.system.mapper.NoticeMapper;
import com.xiaoge.system.service.NoticeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 通知公告表 服务实现类
 * </p>
 *
 * @author xiaoge
 * @since 2021-03-19
 */
@Service
public class NoticeServiceImpl extends ServiceImpl<NoticeMapper, Notice> implements NoticeService {

    @Autowired
    private NoticeMapper noticeMapper;
    /**
     * 查询通知详情
     *
     * @param noticeId
     * @return
     */
    @Override
    public Result getNoticeById(Long noticeId) {
        Notice notice=noticeMapper.getNoticeById( noticeId);
        return Result.ok().data("notice",notice);
    }
}
